@echo off
setlocal

:: 检查目标目录是否存在，如果不存在则创建
if "%~1"=="" (
    set "TargetDirectory=%~dp0bin"
) else (
    set "TargetDirectory=%~1"
)
mkdir "%TargetDirectory%"

:: 定义源目录列表
set "SourceDirectories=F:\mycode\cplusplus\qos\third_party\lib\x64\poco\;F:\mycode\cplusplus\qos\third_party\lib\x64\openssl;F:\mycode\cplusplus\qos\third_party\lib\x64\gtest"

:: 遍历所有源目录并复制 DLL 文件
for %%D in (%SourceDirectories%) do (
    echo Copying DLL files from "%%D" to "%TargetDirectory%"
    xcopy "%%D\*.dll" "%TargetDirectory%" /Y /I
)

echo DLL files copied successfully.
endlocal
pause